
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>logback中文网|第十四章：Receivers</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="logback中文网包含了logback中文文档，最新资讯，应用案例等。logback 继承自 log4j，它建立在有十年工业经验的日志系统之上。它比其它所有的日志系统更快并且更小，包含了许多独特并且有用的特性。"><meta name="keywords" content="logback中文文档, logback api文档, logback log4j,springboot logback,logback日志类型">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="15第十五章使用SSL.html" />
    
    
    <link rel="prev" href="13第十三章从log4j迁移.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="01第一章logback介绍.html">
            
                <a href="01第一章logback介绍.html">
            
                    
                    第一章：logback 介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="02第二章架构.html">
            
                <a href="02第二章架构.html">
            
                    
                    第二章：架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="03第三章logback的配置.html">
            
                <a href="03第三章logback的配置.html">
            
                    
                    第三章：logback 的配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="04第四章Appenders.html">
            
                <a href="04第四章Appenders.html">
            
                    
                    第四章：Appenders
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="05第五章Encoder.html">
            
                <a href="05第五章Encoder.html">
            
                    
                    第五章：Encoder
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="06第六章Layouts.html">
            
                <a href="06第六章Layouts.html">
            
                    
                    第六章：Layouts
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="07第七章Filters.html">
            
                <a href="07第七章Filters.html">
            
                    
                    第七章：Filters
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="08第八章MDC.html">
            
                <a href="08第八章MDC.html">
            
                    
                    第八章：MDC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="09第九章日志隔离.html">
            
                <a href="09第九章日志隔离.html">
            
                    
                    第九章：日志隔离
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.11" data-path="10第十章JMX配置器.html">
            
                <a href="10第十章JMX配置器.html">
            
                    
                    第十章：JMX 配置器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.12" data-path="11第十一章Joran.html">
            
                <a href="11第十一章Joran.html">
            
                    
                    第十一章：Joran
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.13" data-path="12第十二章Groovy配置.html">
            
                <a href="12第十二章Groovy配置.html">
            
                    
                    第十二章：Groovy 配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.14" data-path="13第十三章从log4j迁移.html">
            
                <a href="13第十三章从log4j迁移.html">
            
                    
                    第十三章：从 log4j 迁移
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.15" data-path="14第十四章Receivers.html">
            
                <a href="14第十四章Receivers.html">
            
                    
                    第十四章：Receivers
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.16" data-path="15第十五章使用SSL.html">
            
                <a href="15第十五章使用SSL.html">
            
                    
                    第十五章：使用 SSL
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >第十四章：Receivers</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x4EC0;&#x4E48;&#x662F;-receiver">&#x4EC0;&#x4E48;&#x662F; Receiver</h2>
<p><em>receiver</em> &#x662F; logback &#x7684;&#x4E00;&#x4E2A;&#x7EC4;&#x4EF6;&#xFF0C;&#x7528;&#x4E8E;&#x63A5;&#x6536;&#x8FDC;&#x7A0B; appender &#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#xFF0C;&#x6839;&#x636E;&#x672C;&#x5730;&#x7B56;&#x7565;&#x6253;&#x5370;&#x63A5;&#x6536;&#x5230;&#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;&#x7ED3;&#x5408;&#x4F7F;&#x7528;&#x57FA;&#x4E8E;&#x5957;&#x63A5;&#x5B57;&#x7684; appender &#x4E0E; receiver&#xFF0C;&#x53EF;&#x4EE5;&#x6784;&#x5EFA;&#x590D;&#x6742;&#x7684;&#x62D3;&#x6251;&#x56FE;&#xFF0C;&#x901A;&#x8FC7;&#x7F51;&#x7EDC;&#x5206;&#x53D1;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;</p>
<p>&#x4E00;&#x4E2A; receiver &#x7EE7;&#x627F; <a href="https://logback.qos.ch/xref/ch/qos/logback/classic/net/ReceiverBase.html" target="_blank"><code>ch.qos.logback.classic.net.ReceiverBase</code></a> &#x7C7B;&#x3002;&#x7531;&#x4E8E; receiver &#x7EE7;&#x627F;&#x4E86;&#x8FD9;&#x4E2A;&#x7C7B;&#xFF0C;&#x6240;&#x4EE5;&#x5B83;&#x4E5F;&#x662F; logback &#x7EC4;&#x4EF6; <a href="https://logback.qos.ch/xref/ch/qos/logback/core/spi/LifeCycle.html" target="_blank">LifeCycle</a> &#x7684;&#x4E00;&#x90E8;&#x5206;&#xFF0C;&#x800C;&#x4E14;&#x5B83;&#x4E5F;&#x662F;&#x4E00;&#x4E2A; <a href="https://logback.qos.ch/xref/ch/qos/logback/core/spi/ContextAware.html" target="_blank">ContextAware</a>&#x3002;</p>
<p>&#x8FC7;&#x53BB;&#x4E3A;&#x4E86;&#x652F;&#x6301;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x901A;&#x8FC7;&#x7F51;&#x7EDC;&#x4F20;&#x8F93;&#xFF0C;logback &#x63D0;&#x4F9B;&#x4E86; <code>SocketAppender</code> &#x4E0E; <code>SimpleSocketServer</code>&#x3002;appender &#x5145;&#x5F53;&#x4E00;&#x4E2A;&#x5BA2;&#x6237;&#x7AEF;&#xFF0C;&#x521D;&#x59CB;&#x5316;&#x5230;&#x670D;&#x52A1;&#x5668;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x7684;&#x7F51;&#x7EDC;&#x8FDE;&#x63A5;&#xFF0C;&#x518D;&#x901A;&#x8FC7;&#x7F51;&#x7EDC;&#x4F20;&#x8F93;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;receiver &#x7EC4;&#x4EF6;&#x4EE5;&#x53CA;&#x76F8;&#x5E94;&#x7684; appender &#x63D0;&#x4F9B;&#x4E86;&#x5F88;&#x5927;&#x7684;&#x7075;&#x6D3B;&#x6027;&#x3002;&#x5728; <em>logback.xml</em> &#x4E2D;&#x914D;&#x7F6E;&#x4E00;&#x4E2A; receiver &#x7EC4;&#x4EF6;&#xFF0C;&#x8DDF;&#x914D;&#x7F6E;&#x5176;&#x5B83;&#x7684;&#x7EC4;&#x4EF6;&#x4E00;&#x6837;&#x3002;&#x8FD9;&#x5141;&#x8BB8;&#x914D;&#x7F6E; receiver &#x7EC4;&#x4EF6;&#x5229;&#x7528; <a href="https://logback.qos.ch/manual/onJoran.html" target="_blank">Joran</a> &#x6240;&#x6709;&#x7684;&#x529F;&#x80FD;&#x3002;&#x800C;&#x4E14;&#xFF0C;&#x4EFB;&#x4F55;&#x5E94;&#x7528;&#x90FD;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x7B80;&#x5355;&#x7684;&#x914D;&#x7F6E;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A; receiver &#x7EC4;&#x4EF6;&#x4ECE;&#x8FDC;&#x7A0B; appender &#x63A5;&#x6536;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;</p>
<p>&#x8FDE;&#x63A5;&#x5F00;&#x59CB;&#x53EF;&#x4EE5;&#x53D1;&#x751F;&#x5728; appender &#x4E0E; recevier &#x4E4B;&#x95F4;&#x7684;&#x4EFB;&#x4F55;&#x4E00;&#x65B9;&#x3002;&#x4E00;&#x4E2A; receiver &#x53EF;&#x4EE5;&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x7684;&#x89D2;&#x8272;&#xFF0C;&#x88AB;&#x52A8;&#x7684;&#x76D1;&#x542C;&#x8FDC;&#x7A0B; appender &#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x8FDE;&#x63A5;&#x3002;&#x6216;&#x8005;&#xFF0C;receiver &#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x89D2;&#x8272;&#xFF0C;&#x521D;&#x59CB;&#x5316;&#x4E0E;&#x8FDC;&#x7A0B; appender &#x670D;&#x52A1;&#x5668;&#x7684;&#x8FDE;&#x63A5;&#x3002;&#x4E0D;&#x7BA1; appender &#x4E0E; receiver &#x7684;&#x89D2;&#x8272;&#x662F;&#x4EC0;&#x4E48;&#xFF0C;<em>&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x603B;&#x662F;&#x4ECE; appender &#x6D41;&#x5411; receiver&#x3002;</em></p>
<p>&#x5141;&#x8BB8; receiver &#x521D;&#x59CB;&#x5316;&#x5230; appender &#x7684;&#x8FDE;&#x63A5;&#x7684;&#x7075;&#x6D3B;&#x6027;&#x5728;&#x7279;&#x5B9A;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x7279;&#x522B;&#x7684;&#x6709;&#x7528;&#xFF1A;</p>
<ul>
<li>&#x7531;&#x4E8E;&#x5B89;&#x5168;&#x7684;&#x539F;&#x56E0;&#xFF0C;&#x4E2D;&#x5FC3;&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x5668;&#x4F4D;&#x4E8E;&#x7F51;&#x7EDC;&#x9632;&#x706B;&#x5899;&#x7684;&#x540E;&#x9762;&#xFF0C;&#x4E0D;&#x5141;&#x8BB8;&#x5373;&#x5C06;&#x5230;&#x6765;&#x7684;&#x8FDE;&#x63A5;&#x3002;&#x4F7F;&#x7528; receiver &#x7EC4;&#x4EF6;&#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x89D2;&#x8272;&#xFF0C;&#x4E2D;&#x5FC3;&#x65E5;&#x5FD7;&#x670D;&#x52A1;&#x5668; (&#x9632;&#x706B;&#x5899;&#x5185;) &#x53EF;&#x4EE5;&#x521D;&#x59CB;&#x5316;&#x5BF9;&#x5E94;&#x7528;&#x7A0B;&#x5E8F; (&#x9632;&#x706B;&#x5899;&#x5916;) &#x7684;&#x8FDE;&#x63A5;&#x3002;</li>
<li>&#x5F00;&#x53D1;&#x8005;&#x5DE5;&#x5177;&#x4E0E;&#x4F01;&#x4E1A;&#x7BA1;&#x7406;&#x5E94;&#x7528;&#x53EF;&#x4EE5;&#x83B7;&#x53D6;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x4E2D;&#x7684;&#x7A0B;&#x5E8F;&#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x6D41;&#x3002;&#x901A;&#x5E38;&#xFF0C;logback &#x901A;&#x8FC7;&#x8981;&#x6C42;&#x63A5;&#x6536;&#x65B9;&#x5E94;&#x7528;&#x7A0B;&#x5E8F; (&#x4F8B;&#x5982;&#xFF0C;IDE &#x4E2D;&#x6B63;&#x5728;&#x8FD0;&#x884C;&#x7684;&#x5F00;&#x53D1;&#x8005;&#x5DE5;&#x5177;) &#x53BB;&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x7684;&#x89D2;&#x8272;&#xFF0C;&#x88AB;&#x52A8;&#x7684;&#x76D1;&#x542C;&#x6765;&#x81EA;&#x8FDC;&#x7A0B; appender &#x7684;&#x8FDE;&#x63A5;&#x6765;&#x652F;&#x6301;&#x8FD9;&#x4E2A; (&#x4F8B;&#x5982;&#x5728; logback Beagle &#x4E2D;)&#x3002;&#x8FD9;&#x63D0;&#x9AD8;&#x4E86;&#x7BA1;&#x7406;&#x7684;&#x56F0;&#x96BE;&#xFF0C;&#x7279;&#x522B;&#x662F;&#x5F53;&#x5DE5;&#x5177;&#x8FD0;&#x884C;&#x5728;&#x5F00;&#x53D1;&#x8005;&#x7684;&#x5DE5;&#x4F5C;&#x7AD9;&#x4E2D;&#x7684;&#x65F6;&#x5019;&#xFF0C;&#x6709;&#x53EF;&#x80FD;&#x662F;&#x901A;&#x8FC7;&#x79FB;&#x52A8;&#x8BBE;&#x5907;&#x3002;&#x4F46;&#x662F;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; logback receiver &#x7EC4;&#x4EF6;&#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x89D2;&#x8272;&#x6765;&#x5B9E;&#x73B0;&#x8FD9;&#x4E9B;&#x5DE5;&#x5177;&#x3002;&#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x5230;&#x8FDC;&#x7A0B; appender &#x7684;&#x8FDE;&#x63A5;&#xFF0C;&#x63A5;&#x6536;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x7528;&#x4E8E;&#x672C;&#x5730;&#x663E;&#x793A;&#xFF0C;&#x8FC7;&#x6EE4;&#x4EE5;&#x53CA;&#x62A5;&#x8B66;&#x3002;</li>
</ul>
<p>&#x4E00;&#x4E2A; logback &#x7684;&#x914D;&#x7F6E;&#x53EF;&#x4EE5;&#x5305;&#x542B;&#x4EFB;&#x4F55;&#x6570;&#x91CF;&#x7684; receiver &#x7EC4;&#x4EF6;&#xFF0C;&#x5145;&#x5F53;&#x4EFB;&#x610F;&#x7EC4;&#x5408;&#x7684;&#x670D;&#x52A1;&#x5668;&#x6216;&#x8005;&#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x89D2;&#x8272;&#x3002;&#x552F;&#x4E00;&#x7684;&#x9650;&#x5236;&#x662F;&#x6BCF;&#x4E2A;&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x89D2;&#x8272;&#x7684; receiver &#x5FC5;&#x987B;&#x76D1;&#x542C;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x7AEF;&#x53E3;&#xFF0C;&#x6BCF;&#x4E2A;&#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x89D2;&#x8272;&#x7684; receiver &#x5C06;&#x4F1A;&#x51C6;&#x5907;&#x7684;&#x8FDE;&#x63A5;&#x5230;&#x4E00;&#x4E2A;&#x8FDC;&#x7A0B;&#x7684; appender &#x4E0A;&#x3002;</p>
<h2 id="receivers-&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x89D2;&#x8272;">Receivers &#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x89D2;&#x8272;</h2>
<p>&#x4E00;&#x4E2A; receiver &#x53EF;&#x4EE5;&#x88AB;&#x914D;&#x7F6E;&#x4E3A;&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x7684;&#x7EDD;&#x5BF9;&#xFF0C;&#x88AB;&#x52A8;&#x7684;&#x76D1;&#x542C;&#x8FDC;&#x7A0B; appender &#x5373;&#x5C06;&#x5230;&#x6765;&#x7684;&#x8FDE;&#x63A5;&#x3002;&#x8FD9;&#x4E2A;&#x529F;&#x80FD;&#x7C7B;&#x4F3C;&#x4E8E;&#x4F7F;&#x7528;&#x72EC;&#x7ACB;&#x7684; <code>SimpleSocketServer</code> &#x5E94;&#x7528;&#xFF0C;&#x7279;&#x522B;&#x662F;&#x5728;&#x4F7F;&#x7528; receiver &#x7EC4;&#x4EF6;&#x65F6;&#xFF0C;<em>&#x4EFB;&#x4F55;</em> &#x5E94;&#x7528;&#x4EC5;&#x4EC5;&#x53EA;&#x9700;&#x8981;&#x5728; <em>logback.xml</em> &#x4E2D;&#x914D;&#x7F6E; receiver &#x5C31;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; logback-classic &#x63A5;&#x6536;&#x6765;&#x81EA;&#x8FDC;&#x7A0B; appender &#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;</p>
<p><img src="images/serverSocketReceiver.png" alt="serverSocketReceiver.png"></p>
<p>logback &#x5305;&#x542B;&#x4E24;&#x4E2A; receiver &#x7EC4;&#x4EF6;&#x7528;&#x4E8E;&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x89D2;&#x8272;&#x3002;<a href="https://logback.qos.ch/xref/ch/qos/logback/classic/net/server/ServerSocketReceiver.html" target="_blank"><code>ServerSocketReceiver</code></a> &#x4EE5;&#x53CA;&#x5B83;&#x652F;&#x6301; SSL &#x7684;&#x5B50;&#x7C7B;&#x578B; <a href="https://logback.qos.ch/xref/ch/qos/logback/classic/net/server/SSLServerSocketReceiver.html" target="_blank"><code>SSLServerSocketReceiver</code></a>&#x3002;&#x8FD9;&#x4E24;&#x4E2A; receiver &#x7EC4;&#x4EF6;&#x90FD;&#x88AB;&#x8BBE;&#x8BA1;&#x6210;&#x7528;&#x6765;&#x63A5;&#x6536;&#x6765;&#x81EA;&#x4E8E; <code>SocketAppender</code> (&#x6216;&#x8005; <code>SSLSocketAppender</code>) &#x5BA2;&#x6237;&#x7AEF;&#x7684;&#x8FDE;&#x63A5;&#x3002;</p>
<p><code>ServerSocketReceiver</code> &#x7EC4;&#x4EF6;&#x63D0;&#x4F9B;&#x4EE5;&#x4E0B;&#x914D;&#x7F6E;&#x5C5E;&#x6027;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;&#x540D;</th>
<th>&#x7C7B;&#x578B;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>address</strong></td>
<td><code>String</code></td>
<td>receiver &#x76D1;&#x542C;&#x7684;&#x672C;&#x5730;&#x7F51;&#x7EDC;&#x63A5;&#x53E3;&#x3002;&#x5982;&#x679C;&#x6CA1;&#x6709;&#x6307;&#x5B9A;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#xFF0C;&#x90A3;&#x4E48;&#x5C06;&#x76D1;&#x542C;&#x6240;&#x6709;&#x7684;&#x7F51;&#x7EDC;&#x63A5;&#x53E3;&#x3002;</td>
</tr>
<tr>
<td><strong>port</strong></td>
<td><code>int</code></td>
<td>receiver &#x76D1;&#x542C;&#x7684; TCP &#x7AEF;&#x53E3;&#x3002;&#x5982;&#x679C;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#x6CA1;&#x6709;&#x88AB;&#x6307;&#x5B9A;&#xFF0C;&#x5C06;&#x4F1A;&#x4F7F;&#x7528;&#x4E00;&#x4E2A;&#x9ED8;&#x8BA4;&#x7684;&#x503C;&#x3002;(&#x8BD1;&#x8005;&#x6CE8;&#xFF1A;&#x9ED8;&#x8BA4;&#x7684;&#x7AEF;&#x53E3;&#x4E3A; 4560)</td>
</tr>
<tr>
<td><strong>ssl</strong></td>
<td><code>SSLConfiguration</code></td>
<td>&#x4EC5;&#x4EC5;&#x652F;&#x6301; <code>SSLServerSocketReceiver</code>&#x3002;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#x63D0;&#x4F9B;&#x4E86; receiver &#x4F7F;&#x7528;&#x7684; SSL &#x914D;&#x7F6E;&#x3002;&#x8BE6;&#x60C5;&#x8BF7;&#x89C1; <a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a></td>
</tr>
</tbody>
</table>
<h3 id="&#x4F7F;&#x7528;-serversocketreceiver">&#x4F7F;&#x7528; ServerSocketReceiver</h3>
<p>&#x4E0B;&#x9762;&#x7684;&#x914D;&#x7F6E;&#x4F7F;&#x7528; <code>ServerSocketReceiver</code> &#x7EC4;&#x4EF6;&#xFF0C;&#x5B83;&#x4F7F;&#x7528;&#x6700;&#x5C0F;&#x7684;&#x672C;&#x5730; appender &#x4EE5;&#x53CA; logger &#x914D;&#x7F6E;&#x3002;&#x63A5;&#x6536;&#x6765;&#x81EA;&#x8FDC;&#x7A0B; appender &#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#xFF0C;&#x5C06;&#x4F1A;&#x5339;&#x914D;&#x5230; root logger&#xFF0C;&#x5E76;&#x8F93;&#x51FA;&#x5230;&#x672C;&#x5730;&#x7684; console appender&#x3002;</p>
<blockquote>
<p>  Example: receiver1.xml</p>
</blockquote>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">configuration</span> <span class="hljs-attr">debug</span>=<span class="hljs-string">&quot;true&quot;</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">appender</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">encoder</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">pattern</span>&gt;</span>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n<span class="hljs-tag">&lt;/<span class="hljs-name">pattern</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">encoder</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">appender</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">root</span> <span class="hljs-attr">level</span>=<span class="hljs-string">&quot;DEBUG&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">appender-ref</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">root</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">receiver</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.classic.net.server.ServerSocketReceiver&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">port</span>&gt;</span>${port}<span class="hljs-tag">&lt;/<span class="hljs-name">port</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">receiver</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">configuration</span>&gt;</span>
</code></pre>
<p>receiver &#x7EC4;&#x4EF6;&#x7684; <em>class</em> &#x5C5E;&#x6027;&#x8868;&#x660E;&#x4E86;&#x6211;&#x4EEC;&#x60F3;&#x8981;&#x4F7F;&#x7528;&#x7684; receiver &#x5B50;&#x7C7B;&#x578B;&#x3002;&#x5728;&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x4F7F;&#x7528; <code>ServerSocketReceiver</code>&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x793A;&#x4F8B;&#x4E2D;&#x7684;&#x670D;&#x52A1;&#x5668;&#x5E94;&#x7528;&#x5728;&#x529F;&#x80FD;&#x4E0E;&#x8BBE;&#x8BA1;&#x4E0A;&#x4E0E; <code>SimpleSocketServer</code> &#x975E;&#x5E38;&#x7684;&#x7C7B;&#x4F3C;&#x3002;&#x5B83;&#x4EC5;&#x4EC5;&#x63A5;&#x6536; logback &#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;&#x4F5C;&#x4E3A;&#x547D;&#x4EE4;&#x884C;&#x7684;&#x53C2;&#x6570;&#xFF0C;&#x5E76;&#x8FD0;&#x884C;&#x7ED9;&#x5B9A;&#x7684;&#x914D;&#x7F6E;&#x3002;&#x867D;&#x7136;&#x6211;&#x4EEC;&#x7684;&#x793A;&#x4F8B;&#x7A0B;&#x5E8F;&#x5F88;&#x7B80;&#x5355;&#xFF0C;&#x4F46;&#x662F;&#x8BF7;&#x8BB0;&#x4F4F;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x5728;<em>&#x4EFB;&#x4F55;</em>&#x5E94;&#x7528;&#x4E2D;&#x914D;&#x7F6E; logback &#x7684; <code>ServerSocketReceiver</code> (&#x6216;&#x8005; <code>SSLServerSocketReceiver</code>) &#x7EC4;&#x4EF6;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5728; <em>logback-examples</em> &#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x65B9;&#x5F0F;&#x8FD0;&#x884C;&#x793A;&#x4F8B;&#x4E2D;&#x670D;&#x52A1;&#x5668;&#x5E94;&#x7528;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dport=6000 chapters.receivers.socket.ReceiverExample \ 
      src/main/java/chapters/receivers/socket/receiver1.xml
</code></pre>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x914D;&#x7F6E;&#x4E86; <code>SocketAppender</code> &#x7684;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x6765;&#x8FDE;&#x63A5;&#x8FD0;&#x884C;&#x4E2D;&#x7684; receiver&#x3002;&#x6211;&#x4EEC;&#x793A;&#x4F8B;&#x5F53;&#x4E2D;&#x7684;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x4EC5;&#x4EC5;&#x52A0;&#x8F7D;&#x4E86; logback &#x914D;&#x7F6E;&#xFF0C;&#x5C31;&#x53EF;&#x4EE5;&#x8FDE;&#x63A5;&#x6211;&#x4EEC;&#x793A;&#x4F8B;&#x4E2D; receiver &#x7684; socket appender&#x3002;&#x7136;&#x540E;&#xFF0C;&#x5B83;&#x4F1A;&#x7B49;&#x5F85;&#x7528;&#x6237;&#x7684;&#x6570;&#x636E;&#xFF0C;&#x4EE5;&#x6D88;&#x606F;&#x7684;&#x5F62;&#x5F0F;&#x8F6C;&#x53D1;&#x7ED9; receiver&#x3002;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5982;&#x4E0B;&#x7684;&#x65B9;&#x5F0F;&#x6765;&#x8FD0;&#x884C;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x793A;&#x4F8B;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dhost=localhost -Dport=6000 \
      chapters.receivers.socket.AppenderExample \
      src/main/java/chapters/receivers/socket/appender1.xml
</code></pre>
<h3 id="&#x4F7F;&#x7528;-sslserversocketreceiver">&#x4F7F;&#x7528; SSLServerSocketReceiver</h3>
<p>&#x4E0B;&#x9762;&#x7684;&#x914D;&#x7F6E;&#x91CD;&#x590D;&#x4F7F;&#x7528;&#x4E86;&#x6700;&#x5C0F;&#x7684; appender &#x4EE5;&#x53CA; logger &#x914D;&#x7F6E;&#xFF0C;&#x4F46;&#x662F;&#x4F7F;&#x7528;&#x4E86;&#x652F;&#x6301; SSL &#x7684; receiver &#x7EC4;&#x4EF6;&#xFF0C;&#x7528;&#x4E8E;&#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x89D2;&#x8272;&#x3002;</p>
<blockquote>
<p>Example: receiver2.xml</p>
</blockquote>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">configuration</span> <span class="hljs-attr">debug</span>=<span class="hljs-string">&quot;true&quot;</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">appender</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">encoder</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">pattern</span>&gt;</span>%d{HH:mm:ss.SSS} [%thread] %-5level %logger - %msg%n<span class="hljs-tag">&lt;/<span class="hljs-name">pattern</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">encoder</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">appender</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">root</span> <span class="hljs-attr">level</span>=<span class="hljs-string">&quot;DEBUG&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">appender-ref</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">root</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">receiver</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.classic.net.server.SSLServerSocketReceiver&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">port</span>&gt;</span>${port}<span class="hljs-tag">&lt;/<span class="hljs-name">port</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">ssl</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">keyStore</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">location</span>&gt;</span>${keystore}<span class="hljs-tag">&lt;/<span class="hljs-name">location</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">password</span>&gt;</span>${password}<span class="hljs-tag">&lt;/<span class="hljs-name">password</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">keyStore</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">ssl</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">receiver</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">configuration</span>&gt;</span>
</code></pre>
<p>&#x8FD9;&#x4E2A;&#x914D;&#x7F6E;&#x4E0E;&#x4E4B;&#x524D;&#x4F7F;&#x7528; <code>ServerSocketReceiver</code> &#x7684;&#x793A;&#x4F8B;&#x672C;&#x8D28;&#x7684;&#x533A;&#x522B;&#x662F;&#x901A;&#x8FC7; <em>class</em> &#x5C5E;&#x6027;&#x6307;&#x5B9A;&#x4E86; <code>SSLServerSocketReceiver</code> &#x4EE5;&#x53CA;&#x5185;&#x5D4C;&#x7684; <code>ssl</code> &#x5C5E;&#x6027;&#xFF0C;&#x4F7F;&#x7528;&#x53D8;&#x91CF;&#x66FF;&#x6362;&#x6765;&#x6307;&#x5B9A; key store &#x4E2D;&#x5305;&#x542B; receiver &#x7684;&#x79C1;&#x94A5;&#x4EE5;&#x53CA;&#x8BC1;&#x4E66;&#x7684;&#x4F4D;&#x7F6E;&#x4EE5;&#x53CA;&#x5BC6;&#x7801;&#x3002;&#x5173;&#x4E8E; logback &#x7EC4;&#x4EF6;&#x914D;&#x7F6E; SSL &#x5C5E;&#x6027;&#x7684;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#x8BF7;&#x67E5;&#x770B;<a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a>&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x76F8;&#x540C;&#x7684;&#x793A;&#x4F8B;&#x670D;&#x52A1;&#x5668;&#x914D;&#x7F6E;&#x6765;&#x8FD0;&#x884C;&#x8FD9;&#x4E2A;&#x914D;&#x7F6E;&#xFF0C;&#x4EC5;&#x4EC5;&#x6DFB;&#x52A0;&#x51E0;&#x4E2A;&#x989D;&#x5916;&#x7684;&#x914D;&#x7F6E;&#x5C5E;&#x6027;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dport=6001 \
      -Dkeystore=file:src/main/java/chapters/appenders/socket/ssl/keystore.jks \
      -Dpassword=changeit \
      chapters.receivers.socket.ReceiverExample \
      src/main/java/chapters/receivers/socket/receiver2.xml
</code></pre>
<p><em>keystore</em> &#x5C5E;&#x6027;&#x88AB;&#x7528;&#x6765;&#x5728;&#x547D;&#x4EE4;&#x884C;&#x6307;&#x5B9A;&#x6587;&#x4EF6; URL &#x6765;&#x6807;&#x8BC6; key store &#x7684;&#x4F4D;&#x7F6E;&#x3002;&#x4F60;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;<a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a>&#x6240;&#x8BF4;&#x7684;&#x7C7B;&#x8DEF;&#x5F84; URL&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x914D;&#x7F6E;&#x4E86; <code>SSLSocketAppender</code> &#x7684;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#x6765;&#x8FDE;&#x63A5;&#x8FD0;&#x884C;&#x4E2D;&#x7684; receiver&#x3002;&#x6211;&#x4EEC;&#x4F7F;&#x7528;&#x5728;&#x4E4B;&#x524D;&#x793A;&#x4F8B;&#x4E2D;&#x4F7F;&#x7528;&#x8FC7;&#x7684;&#x7B80;&#x5355;&#x793A;&#x4F8B;&#x5BA2;&#x6237;&#x7AEF;&#x5E94;&#x7528;&#xFF0C;&#x901A;&#x8FC7;&#x4E00;&#x4E2A;&#x5F00;&#x542F;&#x4E86; SSL appender &#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x4EE5;&#x5982;&#x4E0B;&#x65B9;&#x5F0F;&#x8FD0;&#x884C;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dhost=localhost -Dport=6001 \
      -Dtruststore=file:src/main/java/chapters/appenders/socket/ssl/truststore.jks \
      -Dpassword=changeit \
      chapters.receivers.socket.AppenderExample \
      src/main/java/chapters/receivers/socket/appender2.xml
</code></pre>
<p>&#x6CE8;&#x610F;&#xFF0C;&#x5728;&#x6211;&#x4EEC;&#x7684;&#x793A;&#x4F8B;&#x4E2D;&#xFF0C;&#x4F7F;&#x7528;&#x4E86;&#x81EA;&#x7B7E;&#x540D;&#x7684; X.509 &#x8BC1;&#x4E66;&#xFF0C;&#x8FD9;&#x4EC5;&#x4EC5;&#x9002;&#x7528;&#x4E8E;&#x6D4B;&#x8BD5;&#x3002;<strong>&#x5728;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x4E2D;&#x7684;&#x8BBE;&#x7F6E;&#x4E2D;&#xFF0C;&#x4F60;&#x5E94;&#x7528;&#x83B7;&#x53D6;&#x4E00;&#x4E2A;&#x5408;&#x9002;&#x7684; X.509 &#x8BC1;&#x4E66;&#xFF0C;&#x7528;&#x4E8E;&#x6807;&#x8BC6;&#x4F60;&#x7684;&#x5F00;&#x542F;&#x4E86; SSL &#x652F;&#x6301;&#x7684; logback &#x7EC4;&#x4EF6;&#x3002;</strong>&#x67E5;&#x770B;<a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a>&#x83B7;&#x53D6;&#x66F4;&#x591A;&#x7684;&#x4FE1;&#x606F;&#x3002;</p>
<h2 id="receivers-&#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x89D2;&#x8272;">Receivers &#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x89D2;&#x8272;</h2>
<p>&#x914D;&#x7F6E; receiver &#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x89D2;&#x8272;&#xFF0C;&#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x5230;&#x8FDC;&#x7A0B; appender &#x7684;&#x8FDE;&#x63A5;&#x3002;&#x8FDC;&#x7A0B; appender &#x5FC5;&#x987B;&#x662F;&#x670D;&#x52A1;&#x5668;&#x7C7B;&#x578B;&#xFF0C;&#x4F8B;&#x5982; <code>ServerSocketAppender</code>&#x3002;</p>
<p><img src="images/socketReceiver.png" alt="socketReceiver"></p>
<p>logback &#x5305;&#x542B;&#x4E24;&#x4E2A; receiver &#x7EC4;&#x4EF6;&#x7528;&#x4E8E;&#x5145;&#x5F53;&#x5BA2;&#x6237;&#x7AEF;&#x89D2;&#x8272;&#xFF1A;<a href="https://logback.qos.ch/xref/ch/qos/logback/classic/net/SocketReceiver.html" target="_blank"><code>SocketReceiver</code></a> &#x4EE5;&#x53CA;&#x5B83;&#x7684;&#x652F;&#x6301; SSL &#x5B50;&#x7C7B;&#x578B;&#x7684; <a href="https://logback.qos.ch/xref/ch/qos/logback/classic/net/SSLSocketReceiver.html" target="_blank"><code>SSLSocketReceiver</code></a>&#x3002;&#x8FD9;&#x4E24;&#x4E2A;&#x7EC4;&#x4EF6;&#x90FD;&#x88AB;&#x8BBE;&#x8BA1;&#x6210;&#x521D;&#x59CB;&#x5316;&#x4E00;&#x4E2A;&#x8FDE;&#x63A5;&#x5230;&#x8FDC;&#x7A0B; appender&#xFF0C;&#x4E5F;&#x5C31;&#x662F; <code>ServerSocketAppender</code> (&#x6216;&#x8005; <code>SSLServerSocketAppender</code>)&#x3002;</p>
<p><code>SocketReceiver</code> &#x5B50;&#x7C7B;&#x578B;&#x652F;&#x6301;&#x5982;&#x4E0B;&#x7684;&#x914D;&#x7F6E;&#x5C5E;&#x6027;&#xFF1A;</p>
<table>
<thead>
<tr>
<th>&#x5C5E;&#x6027;&#x540D;</th>
<th>&#x7C7B;&#x578B;</th>
<th>&#x63CF;&#x8FF0;</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>remoteHost</strong></td>
<td><code>String</code></td>
<td>&#x8FDC;&#x7A0B;&#x670D;&#x52A1;&#x5668; socket appender &#x7684; hostname &#x6216;&#x8005;&#x5730;&#x5740;</td>
</tr>
<tr>
<td><strong>port</strong></td>
<td><code>int</code></td>
<td>&#x8FDC;&#x7A0B;&#x670D;&#x52A1;&#x5668; socket appender &#x7684;&#x7AEF;&#x53E3;&#x53F7;</td>
</tr>
<tr>
<td><strong>reconnectionDelay</strong></td>
<td><code>int</code></td>
<td>&#x5728;&#x67D0;&#x6B21;&#x8FDE;&#x63A5;&#x5931;&#x8D25;&#x4E4B;&#x540E;&#xFF0C;&#x5728;&#x5C1D;&#x8BD5;&#x91CD;&#x8FDE;&#x65F6;&#x7684;&#x7B49;&#x5F85;&#x65F6;&#x95F4;&#x3002;&#x9ED8;&#x8BA4;&#x503C;&#x4E3A; 3000 (30 &#x79D2;)&#x3002;</td>
</tr>
<tr>
<td><strong>ssl</strong></td>
<td><code>SSLConfiguration</code></td>
<td>&#x4EC5;&#x4EC5;&#x652F;&#x6301; <code>SSLSocketReceiver</code>&#xFF0C;&#x8FD9;&#x4E2A;&#x5C5E;&#x6027;&#x63D0;&#x4F9B;&#x4E86;&#x7528;&#x4E8E;&#x8FD9;&#x4E2A;  receiver &#x7684; SSL &#x914D;&#x7F6E;&#x3002;&#x5982;<a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a>&#x63CF;&#x8FF0;&#x7684;&#x90A3;&#x6837;&#x3002;</td>
</tr>
</tbody>
</table>
<h3 id="&#x4F7F;&#x7528;-socketreceiver">&#x4F7F;&#x7528; SocketReceiver</h3>
<p>&#x7528;&#x4E8E; <code>SocketReceiver</code> &#x7684;&#x914D;&#x7F6E;&#x8DDF;&#x4E4B;&#x524D;&#x4F7F;&#x7528; <code>ServerSocketReceiver</code> &#x7684;&#x793A;&#x4F8B;&#x975E;&#x5E38;&#x7684;&#x76F8;&#x4F3C;&#x3002;&#x4E0D;&#x540C;&#x7684;&#x5730;&#x65B9;&#x5728;&#x4E8E;&#x5BA2;&#x6237;&#x7AEF;&#x4E0E;&#x670D;&#x52A1;&#x7AEF;&#x7684;&#x89D2;&#x8272;&#x53CD;&#x8F6C;&#x4E86;&#x3002;<code>SocketReceiver</code> &#x7C7B;&#x578B;&#x7684; receiver &#x4E3A;&#x5BA2;&#x6237;&#x7AEF;&#xFF0C;&#x8FDC;&#x7A0B; appender &#x5145;&#x5F53;&#x670D;&#x52A1;&#x5668;&#x7684;&#x89D2;&#x8272;&#x3002;</p>
<blockquote>
<p>  Example: receiver3.xml</p>
</blockquote>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">configuration</span> <span class="hljs-attr">debug</span>=<span class="hljs-string">&quot;true&quot;</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">appender</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span>    
    <span class="hljs-tag">&lt;<span class="hljs-name">encoder</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">pattern</span>&gt;</span>%date %-5level [%thread] %logger - %message%n<span class="hljs-tag">&lt;/<span class="hljs-name">pattern</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">encoder</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">appender</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">root</span> <span class="hljs-attr">level</span>=<span class="hljs-string">&quot;DEBUG&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">appender-ref</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">root</span>&gt;</span>  

  <span class="hljs-tag">&lt;<span class="hljs-name">receiver</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.classic.net.SocketReceiver&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">remoteHost</span>&gt;</span>${host}<span class="hljs-tag">&lt;/<span class="hljs-name">remoteHost</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">port</span>&gt;</span>${port}<span class="hljs-tag">&lt;/<span class="hljs-name">port</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">reconnectionDelay</span>&gt;</span>10000<span class="hljs-tag">&lt;/<span class="hljs-name">reconnectionDelay</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">receiver</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">configuration</span>&gt;</span>
</code></pre>
<p>&#x8FD9;&#x4E2A;&#x914D;&#x7F6E;&#x5C06;&#x4F1A;&#x4F7F; logback &#x8FDE;&#x63A5;&#x901A;&#x8FC7; <em>host</em> &#x4E0E; <em>port</em> &#x53D8;&#x91CF;&#x66FF;&#x6362;&#x6307;&#x5B9A;&#x7684;&#x4E3B;&#x673A;&#x4E0E;&#x7AEF;&#x53E3;&#x4E0A;&#x7684; <code>ServerSocketAppender</code>&#x3002;&#x5C06;&#x4F1A;&#x901A;&#x8FC7; console appender &#x672C;&#x5730;&#x8F93;&#x51FA; (&#x6839;&#x636E;&#x8FD9;&#x91CC;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;) &#x4ECE;&#x8FDC;&#x7A0B; appender &#x63A5;&#x6536;&#x5230;&#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;</p>
<p>&#x4F60;&#x53EF;&#x4EE5;&#x5728; <em>logback-examples/</em> &#x6587;&#x4EF6;&#x5939;&#x4E0B;&#xFF0C;&#x901A;&#x8FC7;&#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x8FD0;&#x884C;&#x793A;&#x4F8B;&#x4E2D;&#x7684;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF1A;</p>
<p>&#x8FD9;&#x4E2A;&#x793A;&#x4F8B;&#x4EC5;&#x4EC5;&#x52A0;&#x8F7D;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#xFF0C;&#x7136;&#x540E;&#x4EC5;&#x4EC5;&#x7B49;&#x5F85;&#x6765;&#x81EA;&#x8FDC;&#x7A0B; appender &#x7684;&#x65E5;&#x5FD7;&#x4E8B;&#x4EF6;&#x3002;&#x5982;&#x679C;&#x4F60;&#x5728;&#x8FDC;&#x7A0B; appender &#x6CA1;&#x6709;&#x8FD0;&#x884C;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x8FD0;&#x884C;&#x8FD9;&#x4E2A;&#x793A;&#x4F8B;&#xFF0C;&#x90A3;&#x4E48;&#x4F60;&#x5C06;&#x4F1A;&#x5468;&#x671F;&#x6027;&#x7684;&#x770B;&#x5230;<em>&#x8FDE;&#x63A5;&#x88AB;&#x62D2;&#x7EDD;</em>&#x7684;&#x65E5;&#x5FD7;&#x6D88;&#x606F;&#x8F93;&#x51FA;&#x3002;receiver &#x5C06;&#x4F1A;&#x5468;&#x671F;&#x6027;&#x7684;&#x5C1D;&#x8BD5;&#x91CD;&#x65B0;&#x8FDE;&#x63A5;&#x8FDC;&#x7A0B; appender&#xFF0C;&#x76F4;&#x5230;&#x8FDE;&#x63A5;&#x6210;&#x529F;&#x6216;&#x8005; logger &#x4E0A;&#x4E0B;&#x6587;&#x5173;&#x95ED;&#x3002;&#x5C1D;&#x8BD5;&#x7684;&#x5EF6;&#x8FDF;&#x95F4;&#x9694;&#x662F;&#x53EF;&#x4EE5;&#x901A;&#x8FC7; <code>reconnectionDelay</code> &#x5C5E;&#x6027;&#x6765;&#x914D;&#x7F6E;&#x7684;&#xFF0C;&#x5982;&#x793A;&#x4F8B;&#x914D;&#x7F6E;&#x4E2D;&#x5C55;&#x793A;&#x7684;&#x4E00;&#x6837;&#x3002;</p>
<pre><code class="lang-shell">java -Dhost=localhost -Dport=6000 \
      chapters.receivers.socket.ReceiverExample \
      src/main/java/chapters/receivers/socket/receiver3.xml
</code></pre>
<p>&#x6211;&#x4EEC;&#x793A;&#x4F8B;&#x4E2D;&#x7684; receiver &#x8FDE;&#x63A5;&#x4E4B;&#x524D;&#x4F7F;&#x7528;&#x8FC7;&#x7684;&#x540C;&#x4E00;&#x4E2A;&#x8FDC;&#x7A0B; apennder&#x3002;&#x8FD9;&#x4E2A;&#x793A;&#x4F8B;&#x52A0;&#x8F7D;&#x4E00;&#x4E2A;&#x5305;&#x542B; <code>ServerSocketAppender</code> &#x7684;&#x914D;&#x7F6E;&#xFF0C;&#x7136;&#x540E;&#x7B49;&#x5F85;&#x7528;&#x6237;&#x7684;&#x8F93;&#x5165;&#xFF0C;&#x8F93;&#x5165;&#x7684;&#x6D88;&#x606F;&#x5C06;&#x4F1A;&#x88AB;&#x4F20;&#x9012;&#x7ED9;&#x5DF2;&#x7ECF;&#x8FDE;&#x63A5;&#x4E0A;&#x7684; receiver&#x3002;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5982;&#x4E0B;&#x65B9;&#x5F0F;&#x8FD0;&#x884C;&#x793A;&#x4F8B; appender &#x5E94;&#x7528;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dport=6000 \
      chapters.receivers.socket.AppenderExample \
      src/main/java/chapters/receivers/socket/appender3.xml
</code></pre>
<p>&#x5982;&#x679C;&#x5728; receiver &#x6CA1;&#x6709;&#x8FDE;&#x63A5;&#x4E0A;&#x7684;&#x60C5;&#x51B5;&#x4E0B;&#x8F93;&#x5165;&#x6D88;&#x606F;&#xFF0C;&#x90A3;&#x4E48;&#x6D88;&#x606F;&#x5C06;&#x4F1A;&#x88AB;&#x4E22;&#x5F03;&#x3002;</p>
<h3 id="&#x4F7F;&#x7528;-socketsslreceiver">&#x4F7F;&#x7528; SocketSSLReceiver</h3>
<p><code>SSLSocketReceiver</code> &#x9700;&#x8981;&#x7684;&#x914D;&#x7F6E;&#x8DDF;&#x4F7F;&#x7528; <code>SocketReceiver</code> &#x975E;&#x5E38;&#x7684;&#x7C7B;&#x4F3C;&#x3002;&#x672C;&#x8D28;&#x7684;&#x533A;&#x522B;&#x5728;&#x4E8E;&#x901A;&#x8FC7; class &#x6307;&#x5B9A;&#x7684; receiver&#xFF0C;&#x4EE5;&#x53CA;&#x901A;&#x8FC7;&#x5185;&#x5D4C;&#x7684; <code>ssl</code> &#x5C5E;&#x6027;&#x53BB;&#x6307;&#x5B9A; SSL &#x914D;&#x7F6E;&#x5C5E;&#x6027;&#x3002;&#x4E0B;&#x9762;&#x662F;&#x4E00;&#x4E2A;&#x57FA;&#x7840;&#x7684;&#x793A;&#x4F8B;&#xFF1A;</p>
<blockquote>
<p>  Example: receiver4.xml</p>
</blockquote>
<pre><code class="lang-xml"><span class="hljs-tag">&lt;<span class="hljs-name">configuration</span> <span class="hljs-attr">debug</span>=<span class="hljs-string">&quot;true&quot;</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">appender</span> <span class="hljs-attr">name</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.core.ConsoleAppender&quot;</span>&gt;</span>    
    <span class="hljs-tag">&lt;<span class="hljs-name">encoder</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">pattern</span>&gt;</span>%date %-5level [%thread] %logger - %message%n<span class="hljs-tag">&lt;/<span class="hljs-name">pattern</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">encoder</span>&gt;</span>         
  <span class="hljs-tag">&lt;/<span class="hljs-name">appender</span>&gt;</span>

  <span class="hljs-tag">&lt;<span class="hljs-name">root</span> <span class="hljs-attr">level</span>=<span class="hljs-string">&quot;DEBUG&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">appender-ref</span> <span class="hljs-attr">ref</span>=<span class="hljs-string">&quot;CONSOLE&quot;</span> /&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">root</span>&gt;</span>  

  <span class="hljs-tag">&lt;<span class="hljs-name">receiver</span> <span class="hljs-attr">class</span>=<span class="hljs-string">&quot;ch.qos.logback.classic.net.SSLSocketReceiver&quot;</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">remoteHost</span>&gt;</span>${host}<span class="hljs-tag">&lt;/<span class="hljs-name">remoteHost</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">port</span>&gt;</span>${port}<span class="hljs-tag">&lt;/<span class="hljs-name">port</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">reconnectionDelay</span>&gt;</span>10000<span class="hljs-tag">&lt;/<span class="hljs-name">reconnectionDelay</span>&gt;</span>
    <span class="hljs-tag">&lt;<span class="hljs-name">ssl</span>&gt;</span>
      <span class="hljs-tag">&lt;<span class="hljs-name">trustStore</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">location</span>&gt;</span>${truststore}<span class="hljs-tag">&lt;/<span class="hljs-name">location</span>&gt;</span>
        <span class="hljs-tag">&lt;<span class="hljs-name">password</span>&gt;</span>${password}<span class="hljs-tag">&lt;/<span class="hljs-name">password</span>&gt;</span>
      <span class="hljs-tag">&lt;/<span class="hljs-name">trustStore</span>&gt;</span>
    <span class="hljs-tag">&lt;/<span class="hljs-name">ssl</span>&gt;</span>
  <span class="hljs-tag">&lt;/<span class="hljs-name">receiver</span>&gt;</span>

<span class="hljs-tag">&lt;/<span class="hljs-name">configuration</span>&gt;</span>
</code></pre>
<p>&#x9664;&#x4E86;&#x5728;&#x4E0A;&#x4E00;&#x4E2A;&#x4F8B;&#x5B50;&#x4E2D;&#x5C55;&#x793A;&#x7684;&#x914D;&#x7F6E;&#x5C5E;&#x6027;&#x4E4B;&#x5916;&#xFF0C;<em>class</em> &#x5C5E;&#x6027;&#x73B0;&#x5728;&#x6307;&#x5B9A;&#x4E86; <code>SSLSocketReceiver</code>&#x3002;&#x914D;&#x7F6E;&#x6587;&#x4EF6;&#x4E2D;&#x5305;&#x542B;&#x4E86;&#x6307;&#x5B9A; trust strore &#x7684;&#x4F4D;&#x7F6E;&#x4E0E;&#x5BC6;&#x7801;&#x7684; SSL &#x914D;&#x7F6E;&#x3002;&#x7528;&#x4E8E;&#x9A8C;&#x8BC1;&#x8FDC;&#x7A0B; appender &#x662F;&#x53EF;&#x4EE5;&#x53D7;&#x4FE1;&#x4EFB;&#x7684;&#x3002;&#x67E5;&#x770B;<a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a>&#x83B7;&#x53D6;&#x66F4;&#x591A;&#x5173;&#x4E8E;&#x914D;&#x7F6E; SSL &#x5C5E;&#x6027;&#x7684;&#x4FE1;&#x606F;&#x3002;</p>
<p>&#x901A;&#x8FC7;&#x5982;&#x4E0B;&#x547D;&#x4EE4;&#x6765;&#x8FD0;&#x884C;&#x793A;&#x4F8B;&#x914D;&#x7F6E;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dhost=localhost -Dport=6001 \
      -Dtruststore=file:src/main/java/chapters/appenders/socket/ssl/truststore.jks \
      -Dpassword=changeit \
      chapters.receivers.socket.ReceiverExample \
      src/main/java/chapters/receivers/socket/receiver4.xml
</code></pre>
<p>&#x4E00;&#x65E6;&#x542F;&#x52A8;&#xFF0C;receiver &#x5C1D;&#x8BD5;&#x53BB;&#x8FDE;&#x63A5;&#x6307;&#x5B9A;&#x7684;&#x8FDC;&#x7A0B; appender&#x3002;&#x5982;&#x679C; appender &#x6CA1;&#x6709;&#x8FD0;&#x884C;&#xFF0C;&#x90A3;&#x4E48;&#x4F60;&#x5C06;&#x4F1A;&#x5728;&#x65E5;&#x5FD7;&#x8F93;&#x51FA;&#x4E2D;&#x5468;&#x671F;&#x6027;&#x7684;&#x770B;&#x5230; &quot;&#x8FDE;&#x63A5;&#x88AB;&#x62D2;&quot; &#x7684;&#x4FE1;&#x606F;&#x3002;&#x5728;&#x5EF6;&#x8FDF;&#x4E86;&#x901A;&#x8FC7; <code>reconnectionDelay</code> &#x6307;&#x5B9A;&#x7684;&#x5468;&#x671F;&#x65F6;&#x95F4;&#x540E;&#xFF0C;receiver &#x5C06;&#x4F1A;&#x5468;&#x671F;&#x6027;&#x7684;&#x91CD;&#x8BD5;&#x5230;&#x8FDC;&#x7A0B; appender &#x7684;&#x8FDE;&#x63A5;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x793A;&#x4F8B;&#x4E2D;&#x7684; receiver &#x4F1A;&#x8FDE;&#x63A5;&#x4E4B;&#x524D;&#x4F7F;&#x7528;&#x8FC7;&#x7684;&#x8FDC;&#x7A0B; appender&#x3002;&#x8FD9;&#x4E2A;&#x793A;&#x4F8B;&#x52A0;&#x8F7D;&#x5305;&#x542B;&#x4E86; <code>SSLServerSocketAppender</code> &#x7684;&#x914D;&#x7F6E;&#xFF0C;&#x7136;&#x540E;&#x7B49;&#x5F85;&#x7528;&#x6237;&#x7684;&#x8F93;&#x5165;&#xFF0C;&#x8F93;&#x5165;&#x7684;&#x4FE1;&#x606F;&#x5C06;&#x4F1A;&#x88AB;&#x4F20;&#x9012;&#x7ED9;&#x8FDE;&#x63A5;&#x4E0A;&#x7684; receiver&#x3002;&#x901A;&#x8FC7;&#x5982;&#x4E0B;&#x65B9;&#x5F0F;&#x8FD0;&#x884C;&#x793A;&#x4F8B; appender &#x5E94;&#x7528;&#xFF1A;</p>
<pre><code class="lang-shell">java -Dport=6001 \
      -Dkeystore=file:src/main/java/chapters/appenders/socket/ssl/keystore.jks \
      -Dpassword=changeit \
      chapters.receivers.socket.AppenderExample \
      src/main/java/chapters/receivers/socket/appender4.xml
</code></pre>
<p>&#x5982;&#x679C;&#x5728; receiver &#x6CA1;&#x6709;&#x8FDE;&#x63A5;&#x4E0A;&#x7684;&#x65F6;&#x5019;&#x8F93;&#x5165;&#x4FE1;&#x606F;&#xFF0C;&#x90A3;&#x4E48;&#x4FE1;&#x606F;&#x5C06;&#x4F1A;&#x88AB;&#x4E22;&#x5F03;&#x3002;</p>
<p>&#x9700;&#x8981;&#x518D;&#x6B21;&#x6CE8;&#x610F;&#x7684;&#x662F;&#xFF0C;&#x6211;&#x4EEC;&#x7684;&#x793A;&#x4F8B;&#x4F7F;&#x7528;&#x7684;&#x662F;&#x4EC5;&#x9002;&#x7528;&#x4E8E;&#x6D4B;&#x8BD5;&#x7684;&#x81EA;&#x7B7E;&#x540D; X.509 &#x8BC1;&#x4E66;&#x3002;<strong>&#x5728;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x4E2D;&#xFF0C;&#x4F60;&#x5E94;&#x8BE5;&#x83B7;&#x53D6;&#x9002;&#x5F53;&#x7684; X.509 &#x8BC1;&#x4E66;&#x6765;&#x6807;&#x8BC6;&#x4F60;&#x7684;&#x652F;&#x6301; SSL &#x7684; logback &#x7EC4;&#x4EF6;&#x3002;</strong>&#x66F4;&#x591A;&#x7EC6;&#x8282;&#x8BF7;&#x67E5;&#x770B;<a href="https://logback.qos.ch/manual/usingSSL.html" target="_blank">&#x7B2C;&#x5341;&#x4E94;&#x7AE0;</a>&#x3002;</p>



                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="13第十三章从log4j迁移.html" class="navigation navigation-prev " aria-label="Previous page: 第十三章：从 log4j 迁移">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="15第十五章使用SSL.html" class="navigation navigation-next " aria-label="Next page: 第十五章：使用 SSL">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"第十四章：Receivers","level":"1.15","depth":1,"next":{"title":"第十五章：使用 SSL","level":"1.16","depth":1,"path":"15第十五章使用SSL.md","ref":"15第十五章使用SSL.md","articles":[]},"previous":{"title":"第十三章：从 log4j 迁移","level":"1.14","depth":1,"path":"13第十三章从log4j迁移.md","ref":"13第十三章从log4j迁移.md","articles":[]},"dir":"ltr"},"config":{"plugins":["add-js-css","myseo"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"add-js-css":{"js":["./lib/site.js"]},"myseo":{"description":"logback中文网包含了logback中文文档，最新资讯，应用案例等。logback 继承自 log4j，它建立在有十年工业经验的日志系统之上。它比其它所有的日志系统更快并且更小，包含了许多独特并且有用的特性。","keywords":"logback中文文档, logback api文档, logback log4j,springboot logback,logback日志类型","titlePrefix":"logback中文网|"},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","keywords":"","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"logback中文手册","gitbook":"*","description":""},"file":{"path":"14第十四章Receivers.md","mtime":"2019-02-12T05:10:32.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-02-24T03:19:05.191Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-add-js-css/fda70cfc36440304bb976a11f47eb151-site.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

